package 异常作业.test01;

public class UserService {
    public void register(String username,String password) throws IllegalNameException {
        if(null == username || username.length() < 2 || username.length() > 14){
            throw new IllegalNameException("用户名不合法，长度在6~14之间");
        }
        System.out.println("注册成功，欢迎["+ username +"]");
    }
}
